<?php
	class Connection
	{
		function DbConnect ($ip, $db, $user, $pass)
		{
			mysql_connect($ip, $user, $pass) or die(mysql_error());
			mysql_select_db($db) or die(mysql_error());

			mysql_query("SET NAMES 'utf8'");
		    mysql_query('SET character_set_connection=utf8');
		    mysql_query('SET character_set_client=utf8');
		    mysql_query('SET character_set_results=utf8'); 
			
			date_default_timezone_set("Brazil/East");
		}
	}
	$connect = new Connection();